CHAPTER 18 A Yes-or-No Proposition: Logistic Regression 253
distribution would very happily violate those limits at extreme doses, which is
obviously illogical.
If you have a binary outcome, you need to fit a function that has an S shape. The
formula calculating Y must be an expression involving X that — by design — can
never produce a Y value outside of the range from 0 to 1, no matter how large or
small X may become.
Of the many mathematical expressions that produce S-shaped graphs, the logistic
function is ideally suited to this kind of data. In its simplest form, the logistic
function is written like this: Y
e
X
1
1
/
, where e is the mathematical con-
stant 2.718, known as a natural logarithm (see Chapter 2). We will use e to repre-
sent this number for the rest of the chapter. Figure 18-2a shows the shape of the
logistic function.
The logistic function shown in Figure 18-2 can be made more versatile for repre-
senting observed data by being generalized. The logistic function is generalized by
adding two adjustable parameters named a and b like this: Y
e
a bX
1
1
/
(
) .
Notice that the a
bX part looks just like the formula for a straight line (see
Chapter 16). It’s the rest of the logistic function that bends the straight line into
its characteristic S shape. The middle of the S (where Y
0 5. ) always occurs when
X
b
a
/
. The steepness of the curve in the middle region is determined by b, as
follows:»
» If b is positive, the logistic function is an upward-sloping S-shaped curve, like
the one shown in Figure 18-2a.
FIGURE 18-2:
The first graph (a)
shows the shape
of the logistic
function. The
second graph (b)
shows that when
b is 0, the logistic
function becomes
a horizontal
straight line.
© John Wiley & Sons, Inc.